package TCP3;

import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.ServerSocket;
import java.net.Socket;

public class Receive {
    public static void main(String[] args) throws IOException {
        System.out.println("服务端启动");
        ServerSocket server = new ServerSocket(10100);
        while(true){
            Socket s=server.accept();
            System.out.println("客户端上线了，ip："+s.getInetAddress().getHostAddress());
            new Mythread(s).start();
        }
    }
}
